package com.yhb.channel.impl.SXY.ResponseParser.impl;

import com.yhb.channel.impl.SXY.ResponseParser.SXYResponseParser;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class BindCardResponse extends SXYResponseParser {
    private BindStatus bindStatus;
    public enum BindStatus {
        INIT,
        SUCCESS,
        FAIL,
        FAILED,
        PROCESS
    }
    private boolean needRedirect; // true 需要 false 不需要

    @Override
    public boolean isOk() {
        return Status.SUCCESS.equals(this.getStatus()) &&
                (
                        BindStatus.PROCESS.equals(this.bindStatus) ||
                        BindStatus.SUCCESS.equals(this.bindStatus)
                );
    }
}
